using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class AragingMap : EntityTypeConfiguration<Araging>
    {
        public AragingMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Custid)
                .IsRequired()
                .HasMaxLength(6);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("Araging");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Custid).HasColumnName("Custid");
            this.Property(t => t.LastInvDate).HasColumnName("LastInvDate");
            this.Property(t => t.LastPymtDate).HasColumnName("LastPymtDate");
            this.Property(t => t.LastInvAmtcust).HasColumnName("LastInvAmtcust");
            this.Property(t => t.LastInvAmtLL).HasColumnName("LastInvAmtLL");
            this.Property(t => t.LastInvAmtDol).HasColumnName("LastInvAmtDol");
            this.Property(t => t.Balancecust).HasColumnName("Balancecust");
            this.Property(t => t.BalanceLL).HasColumnName("BalanceLL");
            this.Property(t => t.BalanceDol).HasColumnName("BalanceDol");
            this.Property(t => t.CurAmtcust).HasColumnName("CurAmtcust");
            this.Property(t => t.CurAmtLL).HasColumnName("CurAmtLL");
            this.Property(t => t.CurAmtDol).HasColumnName("CurAmtDol");
            this.Property(t => t.OVER30cust).HasColumnName("OVER30cust");
            this.Property(t => t.OVER30LL).HasColumnName("OVER30LL");
            this.Property(t => t.OVER30Dol).HasColumnName("OVER30Dol");
            this.Property(t => t.OVER60cust).HasColumnName("OVER60cust");
            this.Property(t => t.OVER60LL).HasColumnName("OVER60LL");
            this.Property(t => t.OVER60Dol).HasColumnName("OVER60Dol");
            this.Property(t => t.OVER90cust).HasColumnName("OVER90cust");
            this.Property(t => t.OVER90LL).HasColumnName("OVER90LL");
            this.Property(t => t.OVER90Dol).HasColumnName("OVER90Dol");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
            this.Property(t => t.LastReturnAmtCust).HasColumnName("LastReturnAmtCust");
            this.Property(t => t.LastReturnAmtLL).HasColumnName("LastReturnAmtLL");
            this.Property(t => t.LastReturnAmtDol).HasColumnName("LastReturnAmtDol");
            this.Property(t => t.LastPymtAmtCust).HasColumnName("LastPymtAmtCust");
            this.Property(t => t.LastPymtAmtLL).HasColumnName("LastPymtAmtLL");
            this.Property(t => t.LastPymtAmtDol).HasColumnName("LastPymtAmtDol");
            this.Property(t => t.Over120Dol).HasColumnName("Over120Dol");
            this.Property(t => t.Over120LL).HasColumnName("Over120LL");
            this.Property(t => t.Over150Dol).HasColumnName("Over150Dol");
            this.Property(t => t.Over150LL).HasColumnName("Over150LL");
        }
    }
}
